package thread;

/**
 * Created with IntelliJ IDEA.
 * Description：获取当前线程的引用
 * User: bjc
 * Date: 2025-08-17
 * Time: 10:55
 */

class MyThread4 extends Thread {
    public void run() {
        System.out.println(this.getId()+","+this.getName());
    }
}


public class ThreadDemo14 {
    public static void main(String[] args) {
        Thread t1 = new MyThread4();
        Thread t2 = new MyThread4();

        t1.start();
        t2.start();
    }
}
